////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                                            //
//                                                         WNProject                                                          //
//                                                                                                                            //
//            This file is distributed under the BSD 2-Clause open source license. See License.txt for details.               //
//                                                                                                                            //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#pragma once

#ifndef __WN_MATH_INTERNAL_ARM_INTERNAL_H__
#define __WN_MATH_INTERNAL_ARM_INTERNAL_H__

#ifndef __WN_MATH_INTERNAL_H__
    #error "ARM/WNInternal.h should never be included directly."
#elif !defined _WN_ARM
    #error "ARM/WNInternal.h has been included on a non ARM platform. Please rectify this."
#elif !defined __WN_MATH_ENABLE_EXTENSIONS
    #error "ARM/WNInternal.h has been included when extensions are disabled. Please rectify this."
#endif

#ifdef _WN_MATH_CONFIG_FORCE_NEON
    #ifdef __WN_NEON_SUPPORTED
        #define __WN_MATH_NEON_FORCED
    #endif
#endif

#ifndef __WN_MATH_NEON_FORCED
    #if defined __WN_NEON_SUPPORTED && defined __WN_NEON_AVAILABLE
        #define __WN_MATH_NEON_FORCED
    #endif
#endif

#if (defined __WN_NEON_SUPPORTED && defined __WN_MATH_ALLOW_RUNTIME) || defined __WN_MATH_NEON_FORCED
    #define __WN_MATH_NEON_ALLOWED
#endif

#ifdef __WN_MATH_NEON_FORCED
    #define __WN_MATH_NEON_AVAILABLE
    #define __WN_MATH_NEON_INLINE WN_FORCE_INLINE
#endif

#ifndef __WN_MATH_NEON_INLINE
    #define __WN_MATH_NEON_INLINE static WN_NO_INLINE
#endif

#endif // __WN_MATH_INTERNAL_ARM_INTERNAL_H__